import "@babel/polyfill";
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
// import ElementUI from "element-ui";
// import "element-ui/lib/theme-chalk/index.css";
import store from "./store";
import mixin from "@/mixin/global";
import VueRouter from "vue-router";
//此VueRouter是自己自定义引入暴露出来的，即是自定义的，以下的VueRouter同样是这样
// 解决两次访问相同路由地址报错
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err);
};

Vue.mixin(mixin);
// Vue.use(ElementUI);
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
